home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000085_icon-group-sender_Thu Jul 5 08:57:30 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f65FvRk19199
for icon-group-addresses; Thu, 5 Jul 2001 08:57:27 -0700 (MST)
Message-Id: <200107051557.f65FvRk19199@baskerville.CS.Arizona.EDU>
Date: Tue, 03 Jul 2001 17:44:12 -0600
From: "Cheyenne Wills" <cheyenne_wills@qwest.net>
To: "'icon-group@CS.Arizona.EDU'" <icon-group@cs.arizona.edu>
Cc: "Art Eschenlauer" <art.eschenlauer@sufsys.com>
X-Accept-Language: en
Subject: Re: Software testing for Icon?
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1443
There are many other types of languages that do not do compile time type
checking (Rexx,
Lisp, etc.) However there are ways of runtime checking
procedure foobar(parm1)
parm1 := integer(parm1) | stop("parm1 cannot be converted to an
integer")
return parm1 * 42
end
Yes.. this is defensive programming and for anything that is critical, I
would
strongly suggest that defensive programming is the best bet (in fact I
would
say that in today's world the lack of defensive programming is what gets
a lot
of people into trouble, everything from buffer overruns to not checking
the
status of values returned to see the function worked or didn't).
Cheyenne
Art Eschenlauer wrote:
>
> One concern that I expect people to raise with respect to using Icon in the
> "mainstream" is, "Icon cannot be trusted because it does not typecheck
> arguments at compile time. How can you protect against programmer errors in
> the arguments passed during infrequently-executed invocations?" I don't
> think that the response (however true) that C++ has compile-time
> type-checking and yet still is notorious for null pointer errors, etc, will
> convince anybody.
>
> This raises two questions in my mind regarding Icon:
>
> 1. Should one adopt a "defensive programming style", always checking the
> arguments passed to each routine?
>
> 2. What work has been done on developing rigorous software-testing
> methodology for Icon programs?